package com.xxx.feignclients;


import com.xxx.domain.CourseUserLearn;
import com.xxx.fallback.CourseUserLearnFeignClientFallBack;
import com.xxx.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient( value = "service-course", fallbackFactory =
        CourseUserLearnFeignClientFallBack.class)
public interface CourseUserLearnFeignClient {
    @RequestMapping(value = "/courseUserLearn/check_is_buy/{loginId}/{courseId}", method = RequestMethod.GET)
    public JSONResult checkIsBuy(@PathVariable("loginId") Long loginId,
                                 @PathVariable Long courseId);


    @RequestMapping(value = "/courseUserLearn/save", method = RequestMethod.POST)
    public JSONResult saveOrUpdate(@RequestBody CourseUserLearn courseUserLearn);
}
